@mixin key-label {
    text-shadow: 1px 1px 1px rgb(0 0 0 / 10%);

    font-size: 12px;
    font-weight: bold;

    cursor: pointer;
    user-select: none;
}

@mixin key {
    cursor: pointer;
    user-select: none;

    display: flex;
    justify-content: center;
    align-items: center;

    box-shadow: inset 1px 1px 1px 0px rgb(255 255 255 / 80%),
        inset -1px -1px 1px 0px rgb(40 49 85 / 30%),
        1px 1px 3px 0px rgb(40 49 85 / 10%);

    transition-duration: 200ms;
}

@mixin key-trans-dark {
    &:hover {
        filter: opacity(0.9);
    }

    &:active {
        filter: opacity(0.83);
    }
}

@mixin key-trans-light {
    &:hover {
        filter: brightness(95%);
    }

    &:active {
        filter: brightness(90%);
    }
}

.divPanelWrapper {
    position: relative;
    width: m#{i}n(100%, 50vh);
    height: 100%;
    background-color: #eaecf3;
    border-radius: 10px;

    display: flex;
    flex-direction: column;
    align-items: center;

    [role="klw"] {
        @include key-label;
        color: white;
        font-size: 18px;
    }
    [role="klgr"] {
        @include key-label;
        color: rgb(96, 96, 96);
        font-size: 18px;
    }

    [role="klb"] {
        @include key-label;
        color: black;
        font-size: 13px;
    }

    [role="klg"] {
        @include key-label;
        color: #16c60c;
        font-size: 12px;
    }

    [role="klo"] {
        @include key-label;
        color: orangered;
        font-size: 12px;
    }

    [role="ksys"] {
        width: 35%;
        height: 55%;
    }
    [role="ksys"] > div:nth-child(2) {
        @include key;
        @include key-trans-dark;

        width: 100%;
        height: 100%;

        background-image: linear-gradient(135deg, #525252, #000000);
        border-radius: 10px;
    }

    [role="kdir"] {
        @include key;
        // only if panel is position:relative can this width
        // is relative to panel's.
        position: absolute;

        left: 50%;
        transform: translate(-50%, -10px);

        background-image: linear-gradient(135deg, #525252, #000000);
        width: 32%;
        height: 12%;

        border-top-left-radius: 50%;
        border-top-right-radius: 50%;
        border-bottom-left-radius: 50%;
        border-bottom-right-radius: 50%;

        cursor: pointer;

        > span {
            width: 30%;
            height: 50%;
            text-align: center;
            //background-color: rebeccapurple;
            font-size: 15px;
            position: absolute;
            color: white;
        }

        > span:nth-child(1) {
            left: 50%;
            transform: translate(-50%, -40%);
        }

        > span:nth-child(2) {
            left: 0;
            transform: translate(25%, 0) rotate(270deg);
        }

        > span:nth-child(3) {
            left: 50%;
            transform: translate(-50%, 50%) rotate(180deg);
        }

        > span:nth-child(4) {
            left: 100%;
            transform: translate(-120%, 0) rotate(90deg);
        }
    }

    [role="kfunc"] {
        width: 14%;
        height: 100%;
    }
    [role="kfuncr1"] {
        width: 45%;
        height: 100%;
    }
    [role="kfunc"] > div:nth-child(2),
    [role="kfuncr1"] > div:nth-child(2) {
        @include key;
        @include key-trans-light;

        width: 100%;
        height: 100%;

        background-image: linear-gradient(135deg, #f4f5f6, #fff);
        border-radius: 6px;
    }

    [role="kbasic"],
    [role="kbasicy"] {
        width: 17%;
        height: 100%;
    }
    [role="kbasic"] > div:nth-child(2),
    [role="kbasicy"] > div:nth-child(2) {
        @include key;
        @include key-trans-dark;

        width: 100%;
        height: 100%;

        background-image: linear-gradient(135deg, #4c4c4c, #000000);
        border-radius: 6px;
    }

    [role="kbasicy"] > div:nth-child(2) {
        @include key;
        @include key-trans-light;

        background-image: linear-gradient(135deg, #fffb00, #e5e100);
    }
}
